Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add HTMLImageElement for Material uniform #5857

Closed
wants to merge 6 commits into from
Closed

add HTMLImageElement for Material uniform #5857

wants to merge 6 commits into from

Conversation

polluxll
Copy link

In order to make an animation by many images,we must know every image status in the process,so I change the timeline to the next time after the current image loaded.

material.uniforms.image = loadedImage;

@ggetz
Copy link
Contributor

ggetz commented Sep 29, 2017

Hey @polluxll, thanks for the PR! Can you submit a Contributor License Agreement (CLA) so we can get this reviewed and merged?

@polluxll
Copy link
Author

@ggetz ,I have submited the CLA file by mail.

from: liu liang [email protected]
to: [email protected]
date: 30 September 2017 at 11:04
subject: CLA

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 5, 2017

@polluxll I emailed you a question about the CLA, but haven't heard back. Please let me know if you didn't receive the email. Thanks!

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 9, 2017

We now have a CLA from @polluxll. Thanks again!

Copy link
Contributor

@ggetz ggetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @polluxll, make sure to update CHANGES.md and add yourself to CONTRIBUTORS.md.

}else if(uniformValue instanceof HTMLImageElement){
material._loadedImages.push({
id : uniformId,
image : uniformValue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this block is a duplicate of the HTMLCanvasElement case, can we just add and additional or for HTMLImageElement?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@polluxll Please address this comment when you have a minute. Thanks!

@@ -941,7 +946,7 @@ define([
uniformType = 'float';
} else if (type === 'boolean') {
uniformType = 'bool';
} else if (type === 'string' || uniformValue instanceof HTMLCanvasElement) {
} else if (type === 'string' || uniformValue instanceof HTMLCanvasElement||uniformValue instanceof HTMLImageElement) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjust formatting here to be consistent with spacing.

hpinkos pushed a commit that referenced this pull request Jun 25, 2018
@hpinkos
Copy link
Contributor

hpinkos commented Jun 25, 2018

Hello @polluxll, thanks for the pull request! In the interest of moving this forward, I've opened #6729 with these changes and I'm going to close this.

@hpinkos hpinkos closed this Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants